package com.wh.codedemon.design.pattern.singleton;

/**
 * TODO
 * 将实例化的对象作为静态常量，在类加载时就完成了实例化，避免了线程同步问题。
 * @auther whoo7
 * @date 2024/1/1 21:36
 */
public class HungrySingleton {
    private static final HungrySingleton INSTANCE = new HungrySingleton();

    public HungrySingleton() {
    }

    public static HungrySingleton getInstance() {
        return INSTANCE;
    }
}
